import {PopupManager} from 'element-ui/lib/utils/popup/index'

export function getMaxZIndex() {
    var PopupManager = 2001
    var zIndex = PopupManager?.zIndex
    /* if (process.env.isvite != 5) {
         var PopupManager = require('element-ui/lib/utils/popup/index')
     }
     var zIndex = PopupManager.zIndex;
     */
    // console.log('PopupManager.zIndex',PopupManager.zIndex);
    if (zIndex) {
        return zIndex;
    }
    let arr = [...document.all].map(e => +window.getComputedStyle(e).zIndex || 0);
    return arr.length ? Math.max(...arr) + 1 : 0
}
